\documentclass{article}
\usepackage[usenames]{color}
\usepackage{gastex}
\usepackage[papersize={9cm,7cm},left=0cm,right=0cm,top=0cm,bottom=0cm,bindingoffset=0cm]{geometry}

\begin{document}

% Loop width and height

\begin{center}
  \begin{picture}(20,40)(25,20)\compatiblegastexun
%     \put(-7,-11){\framebox(118,28){}}
%    \gasset{Nw=5,Nh=5,fillgray=1}
    \gasset{Nw=10,Nh=10,fillgray=1,Nmr=0,linewidth=0.5}
%  \node[Nw=15,Nh=6,Nmr=0](A)(25,0){rectangle}
\huge{

    \node(A_1)(0,30){0}
    \node(A_2)(10,30){1}
    \node(A_3)(20,30){0}
    \node(A_4)(30,30){$\diamond$}
    \node(A_5)(40,30){$\diamond$}
    \node(A_6)(50,30){1}

    \node(B_1)(15,0){0}
    \node(B_2)(25,0){$\diamond$}
    \node(B_3)(35,0){1}
    }
\gasset{linecolor=Green}
    \drawundirectededge(B_1,A_1){}
    \drawundirectededge(B_1,A_2){}
    \drawundirectededge(B_1,A_3){}
    \drawundirectededge(B_1,A_4){}

\gasset{linecolor=Red}
    \drawundirectededge(B_2,A_2){}
    \drawundirectededge(B_2,A_3){}
    \drawundirectededge(B_2,A_4){}
    \drawundirectededge(B_2,A_5){}

\gasset{linecolor=Blue}
    \drawundirectededge(B_3,A_3){}
    \drawundirectededge(B_3,A_4){}
    \drawundirectededge(B_3,A_5){}
    \drawundirectededge(B_3,A_6){}

  \end{picture}
\end{center}
 \end{document}


